package university.dropcourse.conversion;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;

import university.dropcourse.dto.DocenteDto;
import university.dropcourse.entity.Docente;

/**
 * Generated class university.dropcourse.conv.DocenteConv
 */
@LocalBean
@Stateless
public class DocenteConv {

    private static final long serialVersionUID = 1L;

    public DocenteConv() {  }

    public DocenteDto fromEntity(Docente in) {
        DocenteDto result = new DocenteDto();
        
        result.setCognome(in.getCognome());
        result.setCorsiIds(null);
        result.setEmail(in.getEmail());
        result.setId(in.getId());
        result.setMatricola(in.getMatricola());
        result.setNome(in.getNome());
        result.setPassword(in.getPassword());

        return result;
    }

    public Docente fromDto(DocenteDto in) {
       Docente result = new Docente();
       
        result.setCognome(in.getCognome());
        result.setCorsi(null);
        result.setEmail(in.getEmail());
        result.setId(in.getId());
        result.setMatricola(in.getMatricola());
        result.setNome(in.getNome());
        result.setPassword(in.getPassword());

        return result;
    }

}